package me.raih.controller.page;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Raih
 * @version 1.8
 * @Time 2020/9/11  10:06
 */
@Controller
public class LoginController {


    @RequestMapping(value = "/login")
    public String toLogin(){

        return "login";
    }

    @ResponseBody
    @RequestMapping(value = "/loginCheck")
    public String loginCheck(String username,String password){

        if("root".equals(username) && "123456".equals(password)){
            return "OK";
        }else {
            return "fail";
        }
    }
}
